package com.cskaoyan.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author stone
 * @date 2022/10/05 14:55
 */
@Controller //把当前类注册为容器中的组件，Controller组件
public class UserController {

    // localhost:8080/user/login
    @RequestMapping("user/login")
    @ResponseBody //让我们能够响应字符串
    public String login() {
        return "hello SpringMVC";
    }

    @RequestMapping("order/create")
    @ResponseBody
    public String createOrder() {
        return "create order";
    }
}
